<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>添加店铺</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no">
	<link rel="stylesheet" href="__PUBLIC__/client/css/cui.css?sj={$tj}" />
	<link rel="stylesheet" href="__PUBLIC__/client/css/slick.css?sj={$tj}" />
	<link rel="stylesheet" href="__PUBLIC__/client/css/style.css?sj={$tj}" />
	<script type="text/javascript" src="__PUBLIC__/client/js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/client/js/lib.js"></script>
</head>
<body class="mhome">
	<div class="viewport">
		<style>
			.bd5 #hm-inp-3{ width: 160px;}
		</style>
		<!--end header-->
		<div id="bd" class="bd5 fix">
			<form id="bbForm">
			<input type="hidden" name="id" value="{$cache.id}" />
			<ul>
                <li class="li1">
                     <p>
                        <em class="empty"></em><input type="text" name="name" class="ayname" id="hm-inp-3" value="{$cache.name}" placeholder="（例：xx洗衣-莲花南路店）">
                    </p>
                    店铺名
                </li>
                <li class="li2">
                    <p>
                        <em class="empty"></em><input type="text" name="owner" class="ayowner" id="hm-inp-3" value="{$cache.owner}" placeholder="请输入店主姓名">
                    </p>
                    店主
                </li>
                <li class="li3">
                    <p>
                        <em class="empty"></em><input type="text" name="mobile" class="aymobile" id="hm-inp-3" value="{$cache.mobile}" placeholder="请输入店主的手机号码">
                    </p>
                    手机
                </li>
                <li class="li4">
                    <p>
                        <em class="empty"></em><input type="text" name="phone" class="ayphone" id="hm-inp-3" value="{$cache.phone}" placeholder="请输入店主的固定电话">
                    </p>
                    固定电话
                </li>
                 <li class="li5">
                    <p>
                        <em class="empty"></em><input type="text" name="address" class="ayaddress" id="hm-inp-3" value="{$cache.address}" placeholder="请输入店铺的地址">
                    </p>
                    地址
                </li>
                 <li class="li6">
                    <p>
                        <em class="empty"></em><input type="text" name="username" class="username" id="hm-inp-3" value="{$cache.username}" placeholder="请输入登录用户名">
                    </p>
                    用户名
                </li>
                <li class="li7">
                    <p>
                        <em class="empty"></em><input type="password" name="password" class="password" id="hm-inp-3" value="" placeholder="请输入登录密码">
                    </p>
                    密码
                </li>
            </ul>
            <div>
                <input id="submit" type="button" value="提交" class="hm-inp-4 btn-yellow btn-yellow-2">
            </div>
            </form>
		</div>
		<div class="c"></div>
		<!--end #bd-->
	</div>
	<script src="__PUBLIC__/business/js/normal.js"></script>
	<script>
		$(function(){
				//下单
				$('#submit').on('click',function(){
					var name=$('.ayname').val();
					var owner=$('.ayowner').val();
					var mobile=$('.aymobile').val();
					var phone=$('.ayphone').val();
					var ddress=$('.ayaddress').val();
					
					if(!name){
						Msg('请输入店铺名！',2);
						return false;
					}
					if(!owner){
						Msg('请输入店主姓名！',2);
						return false;
					}
					if(!mobile){
						Msg('请输入店主手机号码！',2);
						return false;
					}
					if(!ddress){
						Msg('请输入店铺地址！',2);
						return false;
					}
					 var tourl="{:U('Client/Kehu/addkehu')}";
           			 var data=$('#bbForm').serialize();
           			 $.post(tourl,data,function(data){
					    if(data.status!=1){
					    		Msg(data.msg,2);
					    }else{
					    		Msg(data.msg,1);
					    		setTimeout(function(){
								WeixinJSBridge.call('closeWindow');
							},2000);
					    }
					 });
					
				});
		});
	</script>
</body>
</html>